from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.conf.urls.defaults import *
from django.conf import settings
from pydemo.control.models import Chart
admin.autodiscover()

info_dict = {
    'queryset': Chart.objects.all(),
}

urlpatterns = patterns('',

    (r'^login/$', 'pydemo.login.login'),
    (r'^logout/$', 'pydemo.login.logout'),
    (r'^list/$', 'pydemo.list.index'),
    (r'^csv/(?P<filename>\w+)/$', 'pydemo.csv_test.output'),
    
    (r'^wiki/', include('pydemo.wiki.urls')),
    
    (r'^polls/', include('pydemo.polls.urls')),
    
    (r'^control/', include('pydemo.control.urls')),
    
    (r'^/?$', 'django.views.generic.list_detail.object_list', info_dict),
    
    (r'^site_images/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_PATH}),

    (r'^admin/(.*)', admin.site.root),
    # Example:
    # (r'^pydemo/', include('pydemo.foo.urls')), 
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:

)
